package com.code.day01;

public class Demo01 {

    public static void main(String[] args) {

/*
*   byte,short,char -> int ->long ->float -> double
*    在没有标识的时候     float num4 = 2.5  f;  默认是double型
*      浮点型也能强制转换为整数 会向下取整 int num7 = (int)num4;  //2
* */

        double num = 2.5;
        System.out.println(num);

        double num5 = (float) 3.5;
        System.out.println(num5);

        long num1 = 100;
        System.out.println(num1);


        float num2 = 100 + num1;
        System.out.println(num2);


        System.out.println("======================================");



        int num3 = (int) 100L;
        System.out.println(num3);


        float num4 = 2.7f;
        System.out.println(num4);

        int num7 = (int)num4;
        System.out.println(num7);


        System.out.println("===================");
//         数据溢出   100亿的二进制  然后把多出去的 前四位砍掉得到了1410065408
//        100亿是36位的二进制  二int最大能承受的是32位的二进制
        int num8 = (int)10000000000L;
        System.out.println(num8);

        System.out.println("====================================");
        byte num9 = (byte)(num7+1);
        System.out.println(num9);



        int none3;
        none3 = 14;
        int none1 =none3 % 3;
        System.out.println(none1);



    }
}
